import service from "./axiosConfig";
import service1 from "./axiosConfigOhter";
/**
 * 分页查找景点列表
 * @param {*} params 
 */
const scenicPage = async (params) => {
    return await service({
        method: 'post',
        url: '/admin/scenic/ww/pageList',
        data: params
    })
}
/**
 * 查找景点的具体信息
 * @param {id} param 
 */
const getScenicInfo = async (param) => {
    return await service({
        method: 'get',
        url: '/admin/scenic/ww/get/' + param,
    })
}
/**
 * 删除景点信息
 * @param {*} param 
 */
const deleteScenicInfo = async (param) => {
    return await service({
        method: 'delete',
        url: '/admin/scenic/delete/' + param,
    })
}
/**
 * 修改景点信息
 * @param {*} params 
 */
const updateScenicInfo = async (params) => {
    return await service({
        method: 'post',
        url: '/admin/scenic/update',
        data: params
    })
}

/**
 * 添加景点
 * @param {*} params 
 */
const addScenicInfo = async (params) => {
    return await service({
        method: 'post',
        url: '/admin/scenic/add',
        data: params
    })
}

const getProvOrCity = async (params) => {
    return await service1({
        method: 'post',
        url: '/admin/region/list',
        data: params
    })
}

/**
 * 添加或者修改轮播图
 * @param {*} params 
 * @returns 
 */
const addOrUpdate = async (params) => {
    return await service({
        method: 'post',
        url: '/admin/scroll/info/addOrUpdate',
        data: params
    })
}
/**
 * 查询轮播图列表
 * @param {*} params 
 * @returns 
 */
const scrollList = async (params) => {
    return await service({
        method: 'get',
        url: '/admin/scroll/info/list',
        data: params
    })
}
/**
 * 删除轮播图
 * @param {*} id 
 * @returns 
 */
const deleteScrollList = async (id) => {
    return await service({
        method: 'delete',
        url: '/admin/scroll/info/delete/' + id,
    })
}

export { scenicPage, getScenicInfo, deleteScenicInfo, updateScenicInfo, addScenicInfo, getProvOrCity, addOrUpdate, scrollList, deleteScrollList }